<template>
	<u-popup :closeOnClickOverlay="true" customStyle="padding: 20rpx 0;" :show="show" :round="40" @close="close"
		@open="open">
		<view class="yun-content">
			<view class="header">
				<view></view>
				<view class="title">
					您的反馈将帮助我们做得更好哟！
				</view>
				<u-icon @click="close" hover-class="yun-hover" size="40" name="close-circle" />
			</view>
			<view class="tabs">
				<view class="tab-item" :class="item===activeTab?'_active':''" v-for="(item,index) in tabList" :key="item"
					@click="activeTab=item">
					{{item}}
				</view>
			</view>

			<u-button :loading="loadingSubmit" custom-style="height:100rpx;border-radius: 20rpx;margin-top: 30rpx;background-color: #716AE5;" type="primary"
				text="提 交"></u-button>
		</view>
	</u-popup>
</template>

<script>
	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				tabList: ['答非所问', '事实错误', '响应太慢', '通知内容错误'],
				activeTab: '通知内容错误',
				loadingSubmit:false
			}
		},
		methods: {
			close() {
				this.$emit('update:show', false)
			},
			open() {},
			hadleTab(item) {
				console.log('item', item);
			}
		}
	}
</script>

<style scoped lang="scss">
	.yun-content {
		height: auto;
		background-color: transparent;
	}

	.header {
		font-size: 30rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 0 50rpx;
	}

	.tabs {
		display: flex;
		justify-content: space-around;
		flex-wrap: wrap;
		gap: 20rpx;

		.tab-item {
			width: calc(50% - 25rpx);
			display: flex;
			align-items: center;
			justify-content: center;
			color: #9296A6;
			border: dashed 2rpx #9296A6;
			padding: 24rpx 28rpx;
			border-radius: 20rpx;

			&._active {
				color: $uni-text-color;
				border: 2rpx solid #beccfc;
				background-color: #beccfc;
			}
		}
	}

	.submit {
		width: 100%;
		height: 100rpx;
		border-radius: 20rpx;
		margin-top: 30rpx;
		background-color: $uni-color-primary;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
	}
</style>